#pragma once

#include <QObject>
#include "ImageProcessPlugin_global.h"

#include "../../../interface/ICore.h "
#include "../../../interface/IFunctionPlugin.h"
#include "../../../interface/IImageProcessor.h"

class ImageProcessPlugin : public QObject, public IFunctionPlugin, public IImageProcessor
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID IID_IFunctionPlugin FILE "ImageProcessPlugin.json")
    Q_INTERFACES(IFunctionPlugin IImageProcessor)

public:
    ImageProcessPlugin();
    ~ImageProcessPlugin() override;

    const FunctionPluginInfo& pluginInfo() const override;
    bool initialize(ICore* core) override;
    void shutdown() override;

    QImage processImage(const QImage& input) override;
    void setParameter(const QString& key, const QVariant& value) override;
    QString status() const override;

private:
    FunctionPluginInfo m_info;
    ICore* m_core = nullptr;
};
